package main

import (
	"fmt"
	"reflect"
)

// MyStruct is type
type MyStruct struct {
	Name string
	Age  int32
}

func main() {

	//var x float64 = 3.4
	//p := reflect.ValueOf(&x)
	//v := p.Elem()
	//v.SetFloat(7.1)

	// x := 3.4
	x := MyStruct{Name: "lee", Age: 22}
	v := reflect.ValueOf(&x)
	v.Elem().Field(0).Set(reflect.ValueOf("eeeeeeeeee"))
	fmt.Println(x)

	// tp := v.Type()
	// fmt.Println("type: ", tp)
	// fmt.Println("kind is float64: ", v.Kind() == reflect.Float64)
	// fmt.Println("value: ", v.Float())
}
